//
//  ViewController.m
//  ScanQRCode
//
//  Created by 张旗 on 8/4/16.
//  Copyright (c) 2016 Maxwell. All rights reserved.
//

#import "ViewController.h"
#import "SCanQRCodeViewController.h"
@interface ViewController ()

@property (nonatomic,strong) SCanQRCodeViewController *scanQRCodeController;
@property (nonatomic,strong) UINavigationController* navController;
@end

@implementation ViewController

- (SCanQRCodeViewController *)scanQRCodeController
{
    if (!_scanQRCodeController) {
        _scanQRCodeController = [[SCanQRCodeViewController alloc] initWithNibName:@"SCanQRCodeViewController" bundle:nil];
    }
    return  _scanQRCodeController;
}

- (UINavigationController *)navController
{
    if (!_navController) {
        _navController = [[UINavigationController alloc] initWithRootViewController:self.scanQRCodeController];
    }
    return _navController;
}


- (IBAction)onpressedButtonShowScanQRCodeController:(id)sender {
    [self presentViewController:self.navController animated:YES completion:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
